import request from './request';
import bodyParse from './bodyParse';


export async function doFetch({ url, params }) {
    return request("/cujin" + url, {
        method: 'POST',
        data: params,
    });
}

export async function getFetch({ url, params }) {
    return request(url + bodyParse(params));
}

export async function formFetch({ url, params }) {
    return request(url, {
        method: 'POST',
        data: params,
        type: "form"
    });
}